package com.atguigu.state.money.allState;

import com.atguigu.state.money.AbstractState;
import com.atguigu.state.money.Context;
import com.atguigu.state.money.StateEnum;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 已发布
 * @create: 2022-03-31 15:29
 **/
public class PublishState  extends AbstractState {

    @Override
    public void acceptOrderEvent(Context context) {
        //把当前状态设置为  NotPayState。。。
        //至于应该变成哪个状态，有流程图来决定
        context.setState(new NotPayState());
    }

    @Override
    public void notPeopleAcceptEvent(Context context) {
        context.setState(new FeedBackState());
    }

    @Override
    public String getCurrentState() {
        return StateEnum.PUBLISHED.getValue();
    }
}
